package ooday02;

public class Teacher extends Person{
    double salary;//工资

    //构造方法
    public Teacher(){}
    //                  "李四",   18,         "北京",           "100"
    public Teacher(String name,int age,String address,double salary){
        //    "李四",18,"北京"
        super(name,age,address);
        this.salary=salary;
    }

    public void teach(){
        System.out.println("教师"+name+"老师教课");
    }
    public void sayHi(){
        System.out.println("大家好，我是"+name+"，今年"+age+"岁了"+"，来自"+address+",工资为"+salary+"。");
    }
}
